<html>

<body>

    <form name="login" action="request.php" method="post" enctype="multipart/form-data">
        <input type="file" name="img">
        <input type="submit" >
        </form>

</body>

</html>

<?php
$link=$con = mysqli_connect("localhost","root","");

if(!$link){
    exit('数据库连接失败');
}

mysqli_set_charset($link,'utf8');

mysqli_select_db($link,'bbs');

$sql="SELECT * FROM `img`";
$result=mysqli_query($link,$sql);

while ($row=mysqli_fetch_array($result)) {//while循环将$result中的结果找出来

    echo "<img src='".$row['website']."'>";
}
